// 2. 导入Vue和Vuex
import Vue from 'vue'
import Vuex from 'vuex'
import movieList from './module/movie-list.js'
import movieDetail from './module/movie-detail.js'
import movieWill from './module/movie-will.js'
import movieTop from './module/movie-top.js'

// 3. 配置Vuex插件
Vue.use(Vuex)

// 4. 创建store实例对象
const store = new Vuex.Store({
  modules: {
    // 一个一个的模块
    list: movieList,
    detail: movieDetail,
    will: movieWill,
    top: movieTop
  }
})

// 5. 导出实例对象
export default store
